package com.uusee.crawler.model;

import java.io.Serializable;

public class CrawlURI implements Serializable {
	private boolean cookieFlag = false;
	private String cookiesFile;
	
	private String sourceSite;
	private String crawlUrl;
	private String charset = "UTF-8";
	private String crawlResult;
	private byte[] crawlBytes;
	private Object model;
	private int crawlStatus;
	private String failureMessage;
	
	
	public boolean isCookieFlag() {
		return cookieFlag;
	}
	public void setCookieFlag(boolean cookieFlag) {
		this.cookieFlag = cookieFlag;
	}
	public String getCookiesFile() {
		return cookiesFile;
	}
	public void setCookiesFile(String cookiesFile) {
		this.cookiesFile = cookiesFile;
	}
	public String getSourceSite() {
		return sourceSite;
	}
	public void setSourceSite(String sourceSite) {
		this.sourceSite = sourceSite;
	}
	public String getCrawlUrl() {
		return crawlUrl;
	}
	public void setCrawlUrl(String crawlUrl) {
		this.crawlUrl = crawlUrl;
	}
	public String getCharset() {
		return charset;
	}
	public void setCharset(String charset) {
		this.charset = charset;
	}
	public String getCrawlResult() {
		return crawlResult;
	}
	public void setCrawlResult(String crawlResult) {
		this.crawlResult = crawlResult;
	}
	public byte[] getCrawlBytes() {
		return crawlBytes;
	}
	public void setCrawlBytes(byte[] crawlBytes) {
		this.crawlBytes = crawlBytes;
	}
	public Object getModel() {
		return model;
	}
	public void setModel(Object model) {
		this.model = model;
	}
	public int getCrawlStatus() {
		return crawlStatus;
	}
	public void setCrawlStatus(int crawlStatus) {
		this.crawlStatus = crawlStatus;
	}
	public String getFailureMessage() {
		return failureMessage;
	}
	public void setFailureMessage(String failureMessage) {
		this.failureMessage = failureMessage;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((crawlUrl == null) ? 0 : crawlUrl.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CrawlURI other = (CrawlURI) obj;
		if (crawlUrl == null) {
			if (other.crawlUrl != null)
				return false;
		} else if (!crawlUrl.equals(other.crawlUrl))
			return false;
		return true;
	}
	
	
	
}
